from Base import Base
from selenium.webdriver.common.by import By


class Page(Base):
    user_loc = (By.XPATH, '//input[@placeholder="请输入用户名"]')

    def user(self):
        self.send_keys(self.user_loc, 'wang')

    pwd_loc = (By.XPATH, '//input[@placeholder="请输入密码"]')

    def pwd(self):
        self.send_keys(self.pwd_loc, '123456')

    login_loc = (By.XPATH, '//*[@id="app"]/div/section/section/main/div[1]/div[2]/button[2]/span')

    def login(self):
        self.click(self.login_loc)

    def dl_lj1(self):
        self.user()
        self.pwd()
        self.login()

